<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
	<script type="text/javascript" src="http://img2.wyzc.com/public/js/jquery/jquery-1.8.2.min.js?wyzc_v=201406201655"></script>

</head>
<body>
 <h1>hello word</h1>
 <h2>I love china</h2>
 <h3>but China do not love me</h3>

 <ul>
	 <li><a href="http://www.baidu.com">啊哈</a></li>
	 <li><a href="http://www.baidu.com">啊哈</a></li>
	 <li><a href="http://www.baidu.com">啊哈</a></li>
	 <li><a href="http://www.baidu.com">啊哈</a></li>
	 <li><a href="http://www.baidu.com">啊哈</a></li>
 </ul>

 <script>

	 $.fn.color = function(option){

		 var default_option = {
			 'color':'#f00'
		 };

		 var setting = $.extend({},default_option,option);
		 console.log(default_option);

		 this.css({color:setting.color})
	 };

	 $('h3').color({color:'#0ff'});

	 $.fn.myPlugin = function () {
		 this.each(function () {
			 $(this).append(' ' + $(this).attr('href'))
		 });
		 return this;
	 };

	 $('a').myPlugin().css({color : "#f0f"});


 </script>
</body>
</html>